Optimal. Leaf size=129 \[ \frac {8 (-1)^{3/4} a^3 \sqrt {d} \text {ArcTan}\left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{f}+\frac {8 i a^3 \sqrt {d \tan (e+f x)}}{f}-\frac {8 a^3 (d \tan (e+f x))^{3/2}}{5 d f}-\frac {2 (d \tan (e+f x))^{3/2} \left (a^3+i a^3 \tan (e+f x)\right )}{5 d f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 129, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {3637, 3673,
3609, 3614, 211} \begin {gather*} \frac {8 (-1)^{3/4} a^3 \sqrt {d} \text {ArcTan}\left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{f}-\frac {8 a^3 (d \tan (e+f x))^{3/2}}{5 d f}+\frac {8 i a^3 \sqrt {d \tan (e+f x)}}{f}-\frac {2 \left (a^3+i a^3 \tan (e+f x)\right ) (d \tan (e+f x))^{3/2}}{5 d f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 3609
Rule 3614
Rule 3637
Rule 3673
Rubi steps
\begin {align*} \int \sqrt {d \tan (e+f x)} (a+i a \tan (e+f x))^3 \, dx &=-\frac {2 (d \tan (e+f x))^{3/2} \left (a^3+i a^3 \tan (e+f x)\right )}{5 d f}+\frac {(2 a) \int \sqrt {d \tan (e+f x)} (a+i a \tan (e+f x)) (4 a d+6 i a d \tan (e+f x)) \, dx}{5 d}\\ &=-\frac {8 a^3 (d \tan (e+f x))^{3/2}}{5 d f}-\frac {2 (d \tan (e+f x))^{3/2} \left (a^3+i a^3 \tan (e+f x)\right )}{5 d f}+\frac {(2 a) \int \sqrt {d \tan (e+f x)} \left (10 a^2 d+10 i a^2 d \tan (e+f x)\right ) \, dx}{5 d}\\ &=\frac {8 i a^3 \sqrt {d \tan (e+f x)}}{f}-\frac {8 a^3 (d \tan (e+f x))^{3/2}}{5 d f}-\frac {2 (d \tan (e+f x))^{3/2} \left (a^3+i a^3 \tan (e+f x)\right )}{5 d f}+\frac {(2 a) \int \frac {-10 i a^2 d^2+10 a^2 d^2 \tan (e+f x)}{\sqrt {d \tan (e+f x)}} \, dx}{5 d}\\ &=\frac {8 i a^3 \sqrt {d \tan (e+f x)}}{f}-\frac {8 a^3 (d \tan (e+f x))^{3/2}}{5 d f}-\frac {2 (d \tan (e+f x))^{3/2} \left (a^3+i a^3 \tan (e+f x)\right )}{5 d f}-\frac {\left (80 a^5 d^3\right ) \text {Subst}\left (\int \frac {1}{-10 i a^2 d^3-10 a^2 d^2 x^2} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{f}\\ &=\frac {8 (-1)^{3/4} a^3 \sqrt {d} \tan ^{-1}\left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{f}+\frac {8 i a^3 \sqrt {d \tan (e+f x)}}{f}-\frac {8 a^3 (d \tan (e+f x))^{3/2}}{5 d f}-\frac {2 (d \tan (e+f x))^{3/2} \left (a^3+i a^3 \tan (e+f x)\right )}{5 d f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 3.32, size = 122, normalized size = 0.95 \begin {gather*} \frac {i a^3 \left (-40 \tanh ^{-1}\left (\sqrt {\frac {-1+e^{2 i (e+f x)}}{1+e^{2 i (e+f x)}}}\right )+\sec ^2(e+f x) (19+21 \cos (2 (e+f x))+5 i \sin (2 (e+f x))) \sqrt {i \tan (e+f x)}\right ) \sqrt {d \tan (e+f x)}}{5 f \sqrt {i \tan (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 326 vs. \(2 (107 ) = 214\).
time = 0.16, size = 327, normalized size = 2.53
method | result | size |
derivativedivides | \(\frac {2 a^{3} \left (-\frac {i \left (d \tan \left (f x +e \right )\right )^{\frac {5}{2}}}{5}-d \left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}+4 i d^{2} \sqrt {d \tan \left (f x +e \right )}-4 d^{3} \left (\frac {i \left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}-\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}\right )\right )}{f \,d^{2}}\) | \(327\) |
default | \(\frac {2 a^{3} \left (-\frac {i \left (d \tan \left (f x +e \right )\right )^{\frac {5}{2}}}{5}-d \left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}+4 i d^{2} \sqrt {d \tan \left (f x +e \right )}-4 d^{3} \left (\frac {i \left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}-\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}\right )\right )}{f \,d^{2}}\) | \(327\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 229 vs. \(2 (110) = 220\).
time = 0.58, size = 229, normalized size = 1.78 \begin {gather*} \frac {5 \, a^{3} d^{2} {\left (-\frac {\left (2 i - 2\right ) \, \sqrt {2} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}} - \frac {\left (2 i - 2\right ) \, \sqrt {2} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}} - \frac {\left (i + 1\right ) \, \sqrt {2} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{\sqrt {d}} + \frac {\left (i + 1\right ) \, \sqrt {2} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{\sqrt {d}}\right )} + \frac {2 \, {\left (-i \, \left (d \tan \left (f x + e\right )\right )^{\frac {5}{2}} a^{3} - 5 \, \left (d \tan \left (f x + e\right )\right )^{\frac {3}{2}} a^{3} d + 20 i \, \sqrt {d \tan \left (f x + e\right )} a^{3} d^{2}\right )}}{d}}{5 \, d f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 376 vs. \(2 (110) = 220\).
time = 0.38, size = 376, normalized size = 2.91 \begin {gather*} \frac {5 \, \sqrt {\frac {64 i \, a^{6} d}{f^{2}}} {\left (f e^{\left (4 i \, f x + 4 i \, e\right )} + 2 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )} \log \left (\frac {{\left (-8 i \, a^{3} d e^{\left (2 i \, f x + 2 i \, e\right )} + \sqrt {\frac {64 i \, a^{6} d}{f^{2}}} {\left (i \, f e^{\left (2 i \, f x + 2 i \, e\right )} + i \, f\right )} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{4 \, a^{3}}\right ) - 5 \, \sqrt {\frac {64 i \, a^{6} d}{f^{2}}} {\left (f e^{\left (4 i \, f x + 4 i \, e\right )} + 2 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )} \log \left (\frac {{\left (-8 i \, a^{3} d e^{\left (2 i \, f x + 2 i \, e\right )} + \sqrt {\frac {64 i \, a^{6} d}{f^{2}}} {\left (-i \, f e^{\left (2 i \, f x + 2 i \, e\right )} - i \, f\right )} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{4 \, a^{3}}\right ) - 16 \, {\left (-13 i \, a^{3} e^{\left (4 i \, f x + 4 i \, e\right )} - 19 i \, a^{3} e^{\left (2 i \, f x + 2 i \, e\right )} - 8 i \, a^{3}\right )} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}}{20 \, {\left (f e^{\left (4 i \, f x + 4 i \, e\right )} + 2 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - i a^{3} \left (\int i \sqrt {d \tan {\left (e + f x \right )}}\, dx + \int \left (- 3 \sqrt {d \tan {\left (e + f x \right )}} \tan {\left (e + f x \right )}\right )\, dx + \int \sqrt {d \tan {\left (e + f x \right )}} \tan ^{3}{\left (e + f x \right )}\, dx + \int \left (- 3 i \sqrt {d \tan {\left (e + f x \right )}} \tan ^{2}{\left (e + f x \right )}\right )\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.66, size = 161, normalized size = 1.25 \begin {gather*} \frac {8 \, \sqrt {2} a^{3} \sqrt {d} \arctan \left (\frac {8 \, \sqrt {d^{2}} \sqrt {d \tan \left (f x + e\right )}}{4 i \, \sqrt {2} d^{\frac {3}{2}} + 4 \, \sqrt {2} \sqrt {d^{2}} \sqrt {d}}\right )}{f {\left (\frac {i \, d}{\sqrt {d^{2}}} + 1\right )}} - \frac {2 \, {\left (i \, \sqrt {d \tan \left (f x + e\right )} a^{3} d^{10} f^{4} \tan \left (f x + e\right )^{2} + 5 \, \sqrt {d \tan \left (f x + e\right )} a^{3} d^{10} f^{4} \tan \left (f x + e\right ) - 20 i \, \sqrt {d \tan \left (f x + e\right )} a^{3} d^{10} f^{4}\right )}}{5 \, d^{10} f^{5}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.44, size = 96, normalized size = 0.74 \begin {gather*} \frac {a^3\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}\,8{}\mathrm {i}}{f}-\frac {2\,a^3\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{3/2}}{d\,f}-\frac {a^3\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{5/2}\,2{}\mathrm {i}}{5\,d^2\,f}+\frac {\sqrt {16{}\mathrm {i}}\,a^3\,\sqrt {d}\,\mathrm {atan}\left (\frac {\sqrt {16{}\mathrm {i}}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}\,1{}\mathrm {i}}{4\,\sqrt {d}}\right )\,2{}\mathrm {i}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________